export const enum ClassCustomCode {
  CreateClassSuccess = 20200,
  SearchClassSuccess = 20201,
  DeleteClassSuccess = 20202,
  UpdateClassSuccess = 20203,
  GetClassDetailSuccess = 20204,
  UpdateStudentSuccess = 20205,

  CourseNotFound = 40200,
  NoPermissionCreate = 40201,
  ClassNotFound = 40202,
  NoPermissionPatch = 40203,
  UserNotExist = 40205,
  NoPermissionDelete = 40206,
  NoPermissionSearch = 40207,
  TeacherNotExists = 40208
}

export const classMessage = {
  'en-US': {
    [ClassCustomCode.CreateClassSuccess]: 'Class created successfully',
    [ClassCustomCode.SearchClassSuccess]: 'Class search successfully',
    [ClassCustomCode.DeleteClassSuccess]: 'Class deleted successfully',
    [ClassCustomCode.UpdateClassSuccess]: 'Class updated successfully',
    [ClassCustomCode.GetClassDetailSuccess]: 'Class detail get successfully',
    [ClassCustomCode.UpdateStudentSuccess]: 'Student updated successfully',

    [ClassCustomCode.CourseNotFound]: 'Course not found',
    [ClassCustomCode.NoPermissionCreate]:
      'No permission to create a class that is not taught by yourself',
    [ClassCustomCode.TeacherNotExists]: 'Teacher not exists',
    [ClassCustomCode.ClassNotFound]: 'Class not found',
    [ClassCustomCode.UserNotExist]: 'User not exist',
    [ClassCustomCode.NoPermissionPatch]:
      'No permission to update a class that is not taught by yourself'
  },
  'zh-CN': {
    [ClassCustomCode.CreateClassSuccess]: '课程创建成功',
    [ClassCustomCode.SearchClassSuccess]: '课程查询成功',
    [ClassCustomCode.DeleteClassSuccess]: '课程删除成功',
    [ClassCustomCode.UpdateClassSuccess]: '课程更新成功',
    [ClassCustomCode.GetClassDetailSuccess]: '课程详情获取成功',
    [ClassCustomCode.UpdateStudentSuccess]: '学生更新成功',

    [ClassCustomCode.CourseNotFound]: '课程不存在',
    [ClassCustomCode.NoPermissionCreate]: '无权限创建非自己任教的班级',
    [ClassCustomCode.TeacherNotExists]: '教师不存在',
    [ClassCustomCode.ClassNotFound]: '未找到指定班级',
    [ClassCustomCode.UserNotExist]: '用户不存在',
    [ClassCustomCode.NoPermissionPatch]: '无权限更新非自己任教的班级',
    [ClassCustomCode.NoPermissionDelete]: '无权限删除非自己任教的班级',
    [ClassCustomCode.NoPermissionSearch]: '无权限查询非自己任教或自己所在的班级'
  }
} as const
